package com.smarthospital.service;

import com.alibaba.fastjson.JSONObject;
import com.smarthospital.entity.dto.PrePayOderDTO;
import com.smarthospital.entity.dto.PrePayResultDTO;
import com.smarthospital.entity.dto.RefundsDTO;
import com.smarthospital.entity.dto.WXQueryOderDTO;
import com.smarthospital.entity.vo.RefundsVO;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.net.URISyntaxException;
import java.security.InvalidKeyException;

public interface PayService {
    PrePayResultDTO prePayOder(Integer orderId, Integer payType, Integer inquiryType,String inquiryTime) throws URISyntaxException, IOException, InvalidKeyException;

    /**
     * 微信支付回调
     * doc  https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_5.shtml
     * @param request
     * @param parm
     */
    void payCallBack(HttpServletRequest request, JSONObject parm);

    void closeOrder(String orderId) throws IOException;

    WXQueryOderDTO queryOrder(String orderId) throws IOException;

    RefundsDTO refunds(String out_trade_no,String reason) throws IOException;
}
